<template>
  <view class="h-skeleton">
    <view class="h-card">
      <view class="h-img h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
      <view class="h-text h-loading"></view>
    </view>
  </view>
</template>

<script>
export default {
  name: "hSkeleton"
}
</script>

<style>
.h-skeleton {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

.h-card {
  position: relative;
  width: 100%;
  height: auto;
}

.h-img {
  height: 150px;
}

.h-text {
  height: 40rpx;
  margin-top: 15rpx;
}

.h-loading {
  background: linear-gradient(90deg, #f2f2f2 25%, #d1d1d1 40%, #f2f2f2 50%);
  background-size: 400% 100%;
  animation: loading 1.4s ease infinite;
}

@keyframes loading {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}
</style>
